﻿[[title="实施项目",pagesize="",orderby="",condition=""]]
<script language="javascript" type="text/javascript">
    function window.onload() {
        wmsCommon.setEditDivStyle("tabDiv", 0.98);
    }
    function changeWindowSize() {
        wmsCommon.setEditDivStyle("tabDiv", 0.98);
    }
    function changeItemChecked(ctl) {
        //debugger;
        var obj = ctl.parentNode.childNodes[2].childNodes[0].childNodes[0];
        obj.value = ctl.checked ? 1 : 0;
    }

    window.attachEvent('onload', pg_load);
    function pg_load() {
        //新增时带出项目分解结构
        //debugger;
        if (wmsCommon.getQueryValue("opt") == "1") {
        
            var dtProjectWBS = eval(wmsCommon.execCommand(String.format("sys(#SysDictManager.GetDictItems('{0}'))", "projectWBS")));
            for (var i = 0; i < dtProjectWBS.length; i++) {
            
                var tblProjectdismemberment = document.all("projectdismemberment");
                var tblRowLength = tblProjectdismemberment.rows.length;
                wmsCommon.newRow('projectdismemberment');
                var iptItemName = tblProjectdismemberment.rows[tblRowLength].childNodes[1].childNodes[0].childNodes[0];
                var iptItemCode = tblProjectdismemberment.rows[tblRowLength].childNodes[1].childNodes[2].childNodes[0].childNodes[0];
                iptItemName.value = dtProjectWBS[i]["value"];
                iptItemCode.value = dtProjectWBS[i]["key"];
            }
        } else if (wmsCommon.getQueryValue("opt") == "3") {  //修改页面更改checkbox选中状态
            var tblProjectdismemberment = document.all("projectdismemberment");
            for (var i = 1; i < tblProjectdismemberment.rows.length; i++) {
                var chkItem = tblProjectdismemberment.rows[i].childNodes[2].childNodes[0];
                var iptChk = tblProjectdismemberment.rows[i].childNodes[2].childNodes[2];
                chkItem.checked = (iptChk.innerHTML == "1" ? true : false);
            }

        }
        //当页面加载完成后 初始化项目分解的序号
        var numL = $(".number");
        for (var i = 0; i < $(numL).length; i++) {
            $(".number").eq(i).html(i + 1);
        }
        $(".completeS input").attr("disabled", "false");
        hiddenUpfile();
        load_ChangeLog();
    }

    ///隐藏分解项中不应该有相关文档的按钮
    function hiddenUpfile() {

        var uL = $(".upfile");
        for (var i = 0; i < uL.length; i++) {

            if (i == 1 || i == 7) {

                $(uL[i]).css("display", "none");
            }
        }


    }
    //加载日志
    function load_ChangeLog() {
        var projectGUID = $(".projectGUID").val();
        var logL = eval(wmsCommon.execCommand(String.format("sys(#ProjectChangeLogManager.GetLogByProjectGUID('{0}'))", projectGUID)));
        var content = "";
        for (var i = 0; i < logL.length; i++) {
            content += "<tr onmouseout='wmsCommon.onMouseOut(this)' onmouseover='wmsCommon.onMouseOver(this)'><td align='center' style='width: 40px'><span>";
            content += i + 1;
            content += "</span></td> <td>";
            content += logL[i]["changeBefore"];
            content += "</td><td>";
            content += logL[i]["changeAfter"];
            content += "</td><td>";
            content += logL[i]["changeColumn"];
            content += "</td><td>";
            content += (logL[i]["changeTime"]).toLocaleString();
            content += "</td><td>";
            content += logL[i]["executor"];
            content += "</td></tr>";
        }

        $("#tab4 table").append(content);
    }
   

</script>
<input type=hidden class="projectGUID" value=$project.Rows.get_Item(0).get_Item("projectGUID").Render() />
<table class="DisplayArea" cellpadding="0" cellspacing="0" align="center" style="width: 100%;
    height: 100%">
    <tr>
      
        <td class="headmiddle" style="height: 26px">
            <span id="LableTitle">查看实施项目</span>
        </td>
    </tr>
    <tr>
        <td class="centermiddle">
            <table id="MainTableInfo">
                <tr>
                    <td>
                        <div id="Div1" style="border: 0px solid #95B0CB; margin-top: 0; margin-left: 10px;
                            margin-right: 10px;">
                            <table id="contenttb" class="tableInput">
                                <tr>
                                    <td class="add-item" style="height: 25px; width: 80px; background: #f3f9fd">
                                        $project.Columns.get_Item("parentGUID").DisplayName
                                    </td>
                                    <td class="add-data" style="width: 40%">
                                        $project.Rows.get_Item(0).get_Item("parentGUID").Render()
                                    </td>
                                    <td class="add-item" style="width: 80px; background: #f3f9fd">
                                        $project.Columns.get_Item("teamCount").DisplayName
                                    </td>
                                    <td class="add-data">
                                        $project.Rows.get_Item(0).get_Item("teamCount").Render()
                                    </td>
                                </tr>
                                <tr>
                                    <td class="add-item" style="height: 25px; background: #f3f9fd">
                                        $project.Columns.get_Item("projectName").DisplayName
                                    </td>
                                    <td class="add-data">
                                        $project.Rows.get_Item(0).get_Item("projectName").Render()
                                    </td>
                                    <td class="add-item" style="height: 25px; background: #f3f9fd">
                                        $project.Columns.get_Item("departmentName").DisplayName
                                    </td>
                                    <td class="add-data">
                                        $project.Rows.get_Item(0).get_Item("departmentName").Render()
                                    </td>
                                </tr>


                                  <tr>
                                  
                                    <td class="add-item" style="background: #f3f9fd">
                                        $project.Columns.get_Item("execdepartName").DisplayName
                                    </td>
                                    <td class="add-data">
                                        $project.Rows.get_Item(0).get_Item("execdepartName").Render()
                                    </td>
                                     <td class="add-item" style="height: 25px; background: #f3f9fd">
                                        $project.Columns.get_Item("projectManagerName").DisplayName
                                    </td>
                                    <td class="add-data">
                                        $project.Rows.get_Item(0).get_Item("projectManagerName").Render()
                                    </td>
                                </tr>                                                              
                                   <tr>
                                    <td class="add-item" style="background: #f3f9fd">
                                        $project.Columns.get_Item("lastSalesName").DisplayName
                                    </td>
                                    <td class="add-data">
                                        $project.Rows.get_Item(0).get_Item("lastSalesName").Render()
                                    </td>
                                    <td class="add-item" style="background: #f3f9fd">
                                        $project.Columns.get_Item("salesName").DisplayName
                                    </td>
                                    <td class="add-data">
                                        $project.Rows.get_Item(0).get_Item("salesName").Render()
                                    </td>
                                </tr>
                                    <tr>
                                    <td class="add-item" style="background: #f3f9fd">
                                        $project.Columns.get_Item("industryLineName").DisplayName
                                    </td>
                                    <td class="add-data">
                                        $project.Rows.get_Item(0).get_Item("industryLineName").Render()
                                    </td>
                                <td class="add-item" style="background: #f3f9fd">
                                          项目技术特征相关文档
                                        </td>
                                         <td class="add-data" >
                                            <a href='javascript:void(0)'  onclick='wmsCommon.uploadFileView("$project.Rows.get_Item(0).get_Item("uploadFileGuid")")' >  
              相关文档
             </a>
                                    </td>
                                </tr>
                                
                            </table>
                        </div>
                        <div id="Div2" style="border: 0px solid #95B0CB; margin-top: 0; margin-left: 9px;
                            margin-right: 10px;">
                            <table>
                                <tr>
                                    <td colspan="4" valign="top">
                                        <!--tab  标签列表  -->
                                        <div id="first" style="border: 0px solid #95B0CB;">
                                            <table id="tabDivContral" style="width: 200px" cellpadding="0" cellspacing="0">
                                                <tr>
                                                    <td>
                                                        <div class="on" lang="tab1" title="实施项目" align="center">
                                                            实施项目</div>
                                                    </td>
                                                    <td>
                                                        <div class="off" lang="tab2" title="项目分解" align="center">
                                                            项目分解</div>
                                                    </td>
                                                      <td>
                                                        <div class="off" lang="tab4" title="项目变更日志" align="center"  style=" width:100px;">
                                                            项目变更日志</div>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                        <div id="tabDiv">
                                            <!-- 实施项目-->
                                            <div id="tab1" style="border: 1px solid #95B0CB; width: 100%">
                                                <table id="Table1" class="tableInput2">
                                                    <tr>
                                                        <td class="add-item" style="height: 25px; width: 80px">
                                                            $project.Columns.get_Item("contactCode").DisplayName
                                                        </td>
                                                        <td class="add-data" style="width: 40%">
                                                            $project.Rows.get_Item(0).get_Item("contactCode").Render()
                                                        </td>
                                                        <td class="add-item" style="width: 80px">
                                                            $project.Columns.get_Item("contractTime").DisplayName
                                                        </td>
                                                        <td class="add-data">
                                                            $project.Rows.get_Item(0).get_Item("contractTime").Render()
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td class="add-item" style="height: 25px; width: 80px">
                                                            $project.Columns.get_Item("customName").DisplayName
                                                        </td>
                                                        <td class="add-data" style="width: 40%">
                                                            $project.Rows.get_Item(0).get_Item("customName").Render()
                                                        </td>
                                                        <td class="add-item" style="width: 80px">
                                                            $project.Columns.get_Item("customRank").DisplayName
                                                        </td>
                                                        <td class="add-data">
                                                            $project.Rows.get_Item(0).get_Item("customRank").Render()
                                                        </td>
                                                    </tr>
                                                     <tr>
                                                        <td class="add-item" style="height: 25px; width: 80px">
                                                            $project.Columns.get_Item("customContact").DisplayName
                                                        </td>
                                                        <td class="add-data" style="width: 40%">
                                                            $project.Rows.get_Item(0).get_Item("customContact").Render()
                                                        </td>
                                                        <td class="add-item" style="width: 80px">
                                                            $project.Columns.get_Item("contactPhone").DisplayName
                                                        </td>
                                                        <td class="add-data">
                                                            $project.Rows.get_Item(0).get_Item("contactPhone").Render()
                                                        </td>
                                                    </tr>
                                                             <tr>
                                                        <td class="add-item" style="height: 25px; width: 80px">
                                                            $project.Columns.get_Item("product").DisplayName
                                                        </td>
                                                        <td class="add-data" style="width: 40%">
                                                            $project.Rows.get_Item(0).get_Item("product").Render()
                                                        </td>
                                                        <td class="add-item" style="width: 80px">
                                                            $project.Columns.get_Item("statusName").DisplayName
                                                        </td>
                                                        <td class="add-data">
                                                            $project.Rows.get_Item(0).get_Item("statusName").Render()
                                                        </td>
                                                    </tr>
                                                      <tr>
                                                        <td class="add-item" style="height: 25px; width: 120px">
                                                            $project.Columns.get_Item("isrelation").DisplayName
                                                        </td>
                                                        <td class="add-data" style="width: 40%">
                                                            $project.Rows.get_Item(0).get_Item("isrelation").Render()
                                                        </td>
                                                        <td class="add-item" style="width: 120px">
                                                            $project.Columns.get_Item("agentName").DisplayName
                                                        </td>
                                                        <td class="add-data">
                                                            $project.Rows.get_Item(0).get_Item("agentName").Render()
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td class="add-item" style="height: 25px; width: 120px">
                                                            $project.Columns.get_Item("estartTime").DisplayName
                                                        </td>
                                                        <td class="add-data" style="width: 40%">
                                                            $project.Rows.get_Item(0).get_Item("estartTime").Render()
                                                        </td>
                                                        <td class="add-item" style="width: 120px">
                                                            $project.Columns.get_Item("rstartTime").DisplayName
                                                        </td>
                                                        <td class="add-data">
                                                            $project.Rows.get_Item(0).get_Item("rstartTime").Render()
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td class="add-item" style="height: 25px; width: 120px">
                                                            $project.Columns.get_Item("eEndTime").DisplayName
                                                        </td>
                                                        <td class="add-data" style="width: 40%">
                                                            $project.Rows.get_Item(0).get_Item("eEndTime").Render()
                                                        </td>
                                                        <td class="add-item" style="width: 120px">
                                                            $project.Columns.get_Item("rEndTIme").DisplayName
                                                        </td>
                                                        <td class="add-data">
                                                            $project.Rows.get_Item(0).get_Item("rEndTIme").Render()
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td class="add-item" style="height: 25px; width: 120px">
                                                            $project.Columns.get_Item("EXECSTARTTIME").DisplayName
                                                        </td>
                                                        <td class="add-data" style="width: 40%">
                                                            $project.Rows.get_Item(0).get_Item("EXECSTARTTIME").Render()
                                                        </td>
                                                        <td class="add-item" style="width: 120px">
                                                            $project.Columns.get_Item("EXECENDTIME").DisplayName
                                                        </td>
                                                        <td class="add-data">
                                                            $project.Rows.get_Item(0).get_Item("EXECENDTIME").Render()
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td class="add-item" style="height: 25px; width: 120px">
                                                            $project.Columns.get_Item("RCHECKOUTTIME").DisplayName
                                                        </td>
                                                        <td class="add-data" style="width: 40%">
                                                            $project.Rows.get_Item(0).get_Item("RCHECKOUTTIME").Render()
                                                        </td>
                                                        <td class="add-item" style="width: 120px">
                                                            $project.Columns.get_Item("ECHECKOUTTIME").DisplayName
                                                        </td>
                                                        <td class="add-data">
                                                            $project.Rows.get_Item(0).get_Item("ECHECKOUTTIME").Render()
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td class="add-item" style="height: 25px; width: 80px">
                                                            $project.Columns.get_Item("solveProcess").DisplayName
                                                        </td>
                                                        <td style="width: 40%" colspan="3">
                                                            $project.Rows.get_Item(0).get_Item("solveProcess").Render()
                                                        </td>
                                                        
                                                    </tr>
                                                  
                                                </table>
                                            </div>
                                            <!-- 项目分解-->
                                            <div id="tab2" class="hide" style="border: 1px solid #95B0CB; width: 100%">
                                                <table class="tblViewList" id="projectdismemberment" style="border-collapse: collapse;"
                                                    border="0" rules="all" cellspacing="0">
                                                    <tr>
                                                        <th style="width: 30px;">
                                                            <span style="cursor: hand" onclick="wmsCommon.checkedAll('projectdismemberment')">选择</span>
                                                        </th>
                                                        <th>
                                                            $project.Childs.get_Item(0).Columns.get_Item("itemName").DisplayName
                                                        </th>
                                                        <th>
                                                            完成情况
                                                        </th>
                                                        <th>
                                                            $project.Childs.get_Item(0).Columns.get_Item("execID").DisplayName
                                                        </th>
                                                        <th>
                                                            $project.Childs.get_Item(0).Columns.get_Item("execDesc").DisplayName
                                                        </th>
                                                         <th>
                                                            $project.Childs.get_Item(0).Columns.get_Item("expectedTime").DisplayName
                                                        </th>
                                                         <th>
                                                            $project.Childs.get_Item(0).Columns.get_Item("realTime").DisplayName
                                                        </th>
                                                        <th>
                                                            $project.Childs.get_Item(0).Columns.get_Item("upfileGUID").DisplayName
                                                        </th>
                                                    </tr>
                                                    #foreach($row in $project.Childs.get_Item(0).Rows) [[section:projectdismemberment{]]
                                                    <tr onmouseout="wmsCommon.onMouseOut(this)" onmouseover="wmsCommon.onMouseOver(this)" class="completeS">
                                                        <td align="center" style="width: 40px">
                                                     <span class="number"></span>
                                                        </td>
                                                        <td>
                                                            $row.get_Item("itemName").Render()
                                                            <div style="display: none">
                                                                $row.get_Item("itemCode").Render()</div>
                                                        </td>
                                                        <td style="width: 100px">
                                                            <input type="checkbox" />
                                                            <div style="display: none" >$row.get_Item("itemChecked").Render("defaultValue=0;")</div>
                                                        </td>
                                                        <td>
                                                            $row.get_Item("execUserName").Render()
                                                        </td>
                                                        <td>
                                                            $row.get_Item("execDesc").Render()
                                                        </td>
                                                           <td>
                                                            $row.get_Item("expectedTime").Render()
                                                        </td>
                                                           <td>
                                                            $row.get_Item("realTime").Render()
                                                        </td>
                                                        <td style="text-align: center" class="upfile">
                                                            <a href='javascript:void(0)'
                                                                onclick='wmsCommon.uploadFileView("$row.get_Item("upfileGUID").Render()")'>
                                                            相关文档 </a>
                                                        </td>
                                                    </tr>
                                                    [[}]] #end
                                                </table>
                                            </div>
                                            
                                             <div id="tab4" class="hide" style="border: 1px solid #95B0CB; margin-top: 0; margin-left: 10px;
                                width: 100%">
                          
                                <table class="tblList" id="Table3" style="border-collapse: collapse;
                                    color: #95B0CB" border="0" rules="all" cellspacing="0">
                                    <tr>
                                        <th style="width: 30px;">
                                            <span>序号</span>
                                        </th>
                                        <th>
                                           变更前
                                        </th>
                                         <th>
                                           变更后
                                        </th>
                                          <th>
                                           变更操作
                                        </th>
                                          <th>
                                          变更时间
                                        </th>
                                          <th>
                                           执行人
                                        </th>
                                    </tr>
                                  
                                </table>
                            </div>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </td>
                </tr>
            </table>
            <table>
                <tr style="height: 20px;">
                    <td colspan="4" valign="middle" style="text-align: center; height: 20px;">
                        <div style="height: 20px; background-color: rgb(233, 231, 215);">
                            $render.RenderButton(" text=关闭; displayType=button ; actionType=close; clientMethod=wmsCommon.closeWin();")
                        </div>
                    </td>
                </tr>
            </table>
            <!-- edit content end-->
        </td>
    </tr>
</table>